--血战麻将机器人逻辑
package.path  = "../psznode/?.lua;" .. package.path

local base = require "base"
local tabletool = require "tabletool"
local timetool = require "timetool"

local baseLogic = require "robotlogic/baselogic"

local RobotLogic = baseLogic:new()

--实际的处理逻辑
local Handler = { }

-----------------------
--需要重写的方法

--[Comment]
--进桌
--
function RobotLogic:entertableR(msghead, msgbody)
    self.service.table_type = msgbody.gameinfo.room_type
    --调用父类实现
    self:super(msghead, msgbody)
end

--[Comment]
--重进桌
--
function RobotLogic:reentertableR(msghead, msgbody)
    self.service.table_type = msgbody.gameinfo.room_type
    --调用父类实现
    self:super(msghead, msgbody)
end

--[Comment]
--金豆场重新匹配
--
function RobotLogic:restartmatchN(msghead, msgbody)
    --调用父类实现
    self:super(msghead, msgbody)
end

--[Comment]
--金币场重新匹配
--
function RobotLogic:restartcoinmatchN(msghead, msgbody)
    --调用父类实现
    self:super(msghead, msgbody)
end

--[Comment]
--准备
--
function RobotLogic:doreadyN(msghead, msgbody)
    self:delay(base.get_random(1,3))

    --调用父类实现
    self:super(msghead, msgbody, "doreadyN")
end

------------------

--[Comment]
--游戏开始
--
function RobotLogic:gamestartN(msghead, msgbody)
   
end

--[Comment]
--响应玩家的操作
--
function RobotLogic:doactionN(msghead, msgbody)
    --什么也不做
end

--[Comment]
--一局游戏结束
--
function RobotLogic:gamebalanceN(msghead, msgbody)
    
end

function RobotLogic:leavetableN(msghead, msgbody)
    self:super(msghead, msgbody, "leavetableN")
end

function RobotLogic:standuptableN(msghead, msgbody)
    self:super(msghead, msgbody, "standuptableN")
    self:leavetableN(msghead, msgbody)
end

return RobotLogic
